import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib as mpl
import warnings
warnings.filterwarnings("ignore")
insurance = pd.read_csv('C:/Users/Lenovo/Desktop/机器学习课程/Data-Visualization-master/Seaborn/Datasets/insurance.csv')
print(insurance.head(10))
###################################################################################
plt.figure(figsize=(6, 8))
sns.kdeplot(insurance.bmi, insurance.charges, shade=True, cmap='Reds', shade_lowest=False)
plt.show()

iris = sns.load_dataset('iris')
sns.kdeplot(iris.sepal_width, iris.sepal_length, shade=True, cmap='Reds', shade_lowest=True)
plt.show()

plt.figure(figsize=(7,7))
sns.swarmplot(x=insurance.smoker, y=insurance.charges)
plt.show()

sns.swarmplot(x='species', y='petal_width', data=iris, size=6)
plt.show()









